1.IE8 compatibility issues, this best deal, converted into IE7 compatible can be. Add the following piece of code to the head, and then as long as it is compatible under IE7, IE8 below is also compatible2.flaot floating caused IE6 double margin problem, this is the most common, but also best to deal with,!important solve, such asmargin-left:10px!important;margin-left:5px;+height:120px;5. Sometimes, in the layout of the time, found that there is a div floating, the next div is to be shown below,
position:absolute, and IE will treat it as poisttion:relative; So, as far as possible, this is a block-level element of float left!
1. Centering problemDiv in the content, ie defaults to center, and FF defaults to left-alignedYou can try adding code Margin:auto
2. Height problemTwo or nested div, above the div set height, if the actual content of the div is greater than the set height, there will be two div overlapping in
In the site design, should pay attention to CSS style compatible with different browser issues, especially for the full use of the div CSS design of the net, you should pay more attention to the IE6 IE7 ff CSS style compatibility, otherwise, your network chaos may go out don't want to appear effect!All browsers commonheight:100px;IE6 Dedicated_height:100px;IE6 Dedicated*height:100px;IE7 Dedicated*+height:100px;IE7,
As a Web architect, in the design of the site, should pay attention to the most common problem is the CSS style compatible with different browser problems, especially for the full use of Div CSS design site, you should pay more attention to the IE6 IE7 FF compatible CSS style, otherwise, your network chaos may go out do not want to appear the effect!
All Browsers Universalheight:100px;
IE6 Special_height:100px;
IE6 Special*height:100px;
IE7 Special
Since the beginning of the Internet, the battle between browsers has not stopped. Of course, the most bitter is the Web page production staff, in order to achieve the user experience and usability standards, have to be in multiple browsers for the unified effect. I really hope that one day FF can eminence, although it is still the big world ie. In particular, Microsoft's latest release of the IE7 browser, its CSS compatibility does give some web maker
In the following example, Internet Explorer is replaced by IE, and mozzila Firefox is replaced by MF/ff.
(1) window. Event
IE: window. event object
FF: There is no window. event object. You can pass the event object to the function parameters. For example, onmousemove = domousemove (Event)
(2) current mouse Coordinate
IE: event. X and event. Y.
FF: event. pagex a
DIV+CSS Resolving IE6,IE7,IE8,FF compatibility issues1.IE8 compatibility issues, this best deal, converted into IE7 compatible can be. Add the following piece of code to the head, and then as long as it is compatible under IE7, IE8 below is also compatible:1.2.2.flaot floating caused IE6 double margin problem, this is the most common, but also best to deal with,!important solve, such asUnder the MARGIN-LEFT:10PX!IMPORTANT;/*IE7,IE8,
These methods are usually used when I find a collection on the Internet, OH, I declare in advance to avoid misunderstanding!
First, CSS HACK
The following two methods can solve almost all hack today.
1,!important
With the support of IE7 to!important, the!important method is now targeted only at IE6 hack. (Note the wording. Remember that the claim position needs to be advanced.)
2, Ie6/ie77 to Firefox
*+html and *html is the unique label of IE, Firefox is not supported. And *+html is IE7 u
This article is mainly about the onchange event in IE and FF performance and solutions are introduced, the need for friends can come to the reference, I hope to help you. In a recent project, there is a function point: there is a checkbox on the page that sends a JSONP request to the background when the user chooses or cancels the checkbox. The implementation was for this checkbox to add a onchange event, but the result is unexpected, for this reaso
CSS compatibility between IE and FF browsers-Web Standard tutorialI. Use of important in IE6 and FF. Box1 {width: 150px! Important ;}. Box1 {width: 250px ;}! Important indicates that this setting has a priority and IE has encountered it! Important does not make an error. It only ignores its function. If width is set later, ie uses the last width as the standard. If there are no other settings later, the cur
In a recent project, there is a function point: there is a checkbox on the page that sends a JSONP request to the background when the user chooses or cancels the checkbox. The implementation was for this checkbox to add a onchange event, but the result is unexpected, for this reason, I studied in depth, found that the onchange event in IE and FF under the performance of the following problems.
problem ①: under FF
function Showwin (O1,O2) {
var Mask=document.getelementbyid (O1);
var Popwin=document.getelementbyid (O2);
Document.documentElement.scrollHeight in IE, FF, Chrome is to get the full content of the Web page heightDocument.documentElement.offsetHeight in IE is to obtain the inner surface of the clientheight (that is, a page does not include the printed debug information), in FF, Chrome to get the full content
The FF interpretation of the box model is also different, code description: #test {width:650px!important;width:648px;padding-left:2px;background: #fff;}
Test shows the broadband is 650px
The total width of IE box is: width+padding+border+margin width sum
The total width of the FF box is width, and the width of the padding+border+margin is contained within the widths.
If there are box{width: "300"; PADDING:
Today, adjust the pop-up layer, encountered a small problem: get scrolltop value?
On the Internet to see some of the high way to get the page was rolled, document.body.scrollTop in IE FF is 0, the strange is in Chrome can.
I guess FF to be closer to IE, I used the FF 13.0.1, can be used in the previous version, this skip ...
The code is as follows
Today, when I was in a 52-field report, I was forced to do a thorough research,
I found:
The default value for display at Col under FF is: Table-column
The default value for visibility is: visible
I checked the CSS manual, found that visibility has a collapse optional value, it is said that in IE is not implemented, IE did not achieve Chou FF did not implement, like FF
For more information, see http://netsos.cnblogs.com/1 ,! Important (limited function)
With IE7! Important Support ,! The important method is only compatible with ie6. (note the writing method. Remember that the declaration position must be in advance .)
For example:
# Example {Width: 100px! Important;/* IE7 + FF */Width: 200px;/* IE6 */}
Ii. CSS hack method (for beginners, let's take a look at it and pass it)
The first thing you need to know i
JS Debugging Tools recommended Firefox Firebug plug-ins
Ability to set breakpoints for JS execution
Ability to modify CSS styles while running
View the DOM model, and so on
☆IE8 's own developerbar is also very good
☆ Turn on Firefox all JS warning:Input in the Address bar: About:configDouble-click to set Javascriptoptionrestict to true to see many warnings for error correction
☆ie->firefoxjavascript class
document.all ("id")->document.getelementbyid ("id")And the controls try to use IDs
// Display attributesDisplayPositionFloatClearCursor...
// AttributesMarginPaddingWidthHeight
/* Typographical */Vertical-alignWhite-spaceText-DecorationText-align...
/* Text */ColorFontContent
/* Border backgroundThe reason why boder and background are put at the end is that the modification frequency is more frequent than before, and it is convenient to view them at the end. */BorderBackground}
ProgramCode:
. Class {Background-color: # FFFF00;/* all browsers */* Background-co
. Other compatibility skills
1. Setting padding for Div under FF will increase the width and height, but IE will not. (available! Important solution)2. center problem.1). Vertical center. Set line-height to the same height of the current Div, and then use vertical-align: middle. (Note that do not wrap the content .)2). horizontal center. Margin: 0 auto; (of course not omnipotent)3. To add a style to the content of tag a, set display: block)4. The diff
How do i make IE FF Opera support alpha transparency at the same time? -DIV+CSS Tutorial
The transparent effect of the picture is a special form that needs to be used in the webpage, although not very commonly used, but meet this kind of demand often a bit unprepared.Knowledge about CSS alpha transparency. First, look at the following code:
Filter:alpha (OPACITY=50); /* IE * *-moz-opacity:0.5; /* Moz +
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.